<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
    <th:block th:include="include :: header('修改合同')" />
</head>
<body class="white-bg">
    <div class="wrapper wrapper-content animated fadeInRight ibox-content">
        <form class="form-horizontal m" id="form-contracts-edit" th:object="${contracts}">
            <input name="contractId" th:field="*{contractId}" type="hidden">
            <div class="col-xs-12">
                <div class="form-group">
                    <label class="col-sm-3 control-label is-required">商品ID：</label>
                    <div class="col-sm-8">
                        <input name="productId" th:field="*{productId}" class="form-control" type="text" required>
                    </div>
                </div>
            </div>
            <div class="col-xs-12">
                <div class="form-group">
                    <label class="col-sm-3 control-label">合同图片：</label>
                    <div class="col-sm-8">
                        <input name="contractImageUrl" th:field="*{contractImageUrl}" class="form-control" type="text">
                    </div>
                </div>
            </div>
            <div class="col-xs-12">
                <div class="form-group">
                    <label class="col-sm-3 control-label is-required">签约人姓名：</label>
                    <div class="col-sm-8">
                        <input name="signerName" th:field="*{signerName}" class="form-control" type="text" required>
                    </div>
                </div>
            </div>
            <div class="col-xs-12">
                <div class="form-group">
                    <label class="col-sm-3 control-label is-required">签约人手机号码：</label>
                    <div class="col-sm-8">
                        <input name="signerPhone" th:field="*{signerPhone}" class="form-control" type="text" required>
                    </div>
                </div>
            </div>
        </form>
    </div>
    <th:block th:include="include :: footer" />
    <script th:inline="javascript">
        var prefix = ctx + "system/contracts";
        $("#form-contracts-edit").validate({
            focusCleanup: true
        });

        function submitHandler() {
            if ($.validate.form()) {
                $.operate.save(prefix + "/edit", $('#form-contracts-edit').serialize());
            }
        }
    </script>
</body>
</html>
